package com.example.mq.common;

import com.example.mq.mqserver.core.BasicProperties;

import java.io.IOException;

/**
 * @Description:回调函数
 * @Author: liudong
 * @Time: 2024/5/18
 */
@FunctionalInterface
public interface Consumer {
    //每次收到消息之后来调用，通过这个方法来把消息推送给对应的消费者
    void handleDelivery(String consumerTag, BasicProperties basicProperties,byte[] body) throws MqException, IOException;
}
